<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>My Servlet</title>
    </head>

    <%
       session.invalidate();
    %>

    <body topmargin="200">
        <table border="1" bordercolor="black" align="center" cellpadding="5" width="250">
             <td>
                <form method="POST" action="CheckUser">
                <table width="100%" cellspacing="0" cellpadding="4">
                     <tr>
                        <td>Login:</td>
                        <td align = "right"> <input autofocus type="text" name="login"></td>
                     </tr>
                     <tr>
                        <td>Password:</td>
                      <td align = "right"><input type="password" name="password"></td>
                     </tr>
                     <tr>
                         <td></td><td align = "right"><button>Sign in</button></td>
                     </tr>
                 </table>
                </form>
             </td>
        </table>
        </center>
     </body>

    <p align="center"><span style="color: red"><%
        if ((request.getAttribute("error"))!=null) {
            out.println(request.getAttribute("error"));
        }
    %> </span>
    </p>

 </html>